/*
 * CameraMotionValidator.h
 *
 *  Created on: Mar 23, 2013
 *      Author: ohnozzy
 */

#ifndef CAMERAMOTIONVALIDATOR_H_
#define CAMERAMOTIONVALIDATOR_H_
#include <ompl/base/DiscreteMotionValidator.h>
#include "CameraSpace.h"
namespace flyingcamera
{
    namespace base
    {
       class CameraMotionValidator: public ompl::base::DiscreteMotionValidator{
       protected:
    	   double max_angle_rate;

       public:
    	   CameraMotionValidator( ompl::base::SpaceInformation* si) : ompl::base::DiscreteMotionValidator(si), max_angle_rate(0)
    	              {

    	              }
    	   virtual void setChangeRateRadian(double change_angle, double duration );
    	   virtual bool checkAngelChangeRate(const flyingcamera::base::CameraSpace::StateType* s1, const flyingcamera::base::CameraSpace::StateType* s2) const;
    	   virtual bool checkMotion(const ompl::base::State *s1, const ompl::base::State *s2) const;

    	   virtual bool checkMotion(const ompl::base::State *s1, const ompl::base::State *s2, std::pair<ompl::base::State*, double> &lastValid) const;


       };
    }
}


#endif /* CAMERAMOTIONVALIDATOR_H_ */
